package com.imufe.chemicalenterprisedangerwarning.entity.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 检查表
 * </p>
 *
 * @author BaiBan
 * @since 2022-10-12
 */
@Data
@TableName("`check`")
@ApiModel(value = "检查表")
public class CheckPO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("检查形式")
    private Byte inspectionMethodId;

    @ApiModelProperty("检查机构")
    @TableField(value = "`organization`")
    private String organization;

    @ApiModelProperty("检查主体; 1-安监局检查; 2-企业检查;")
    @TableField(value = "`type`")
    private Byte type;

    @ApiModelProperty("总分; 总分为空表示暂存;")
    private Integer totalScore;

    @ApiModelProperty("游标;暂存记录时记录到第几项;游标为空表示全部完成")
    @TableField(value = "`cursor`")
    private Integer cursor;

    @ApiModelProperty("用户编号")
    private Long userId;

    @ApiModelProperty("企业编号")
    private Long enterpriseId;

    @ApiModelProperty("是否删除")
    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
